package org.dtrd.modules.service.entity.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.service.entity.po.DtrdRlPackagePatient;

import java.util.Date;

/**
 * @author qr
 * @date 2022/4/13 11:16
 */
@ApiModel("患者首页服务包相关信息")
@Getter
@Setter
public class PatientServiceIndexInfo {

    @ApiModelProperty("服务状态")
    private Integer serviceStatus;

    @ApiModelProperty("服务包名称")
    private String serviceName;

    @ApiModelProperty("服务开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date serviceStartTime;

    @ApiModelProperty("服务结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date serviceEndTime;

    public PatientServiceIndexInfo parseFromPO(DtrdRlPackagePatient po) {
        this.setServiceStatus(po.getStatus());
        this.setServiceStartTime(po.getStartTime());
        this.setServiceEndTime(po.getEndTime());
        return this;
    }

}
